using Microsoft.AspNetCore.Components;
using StudentVideo.Client.Services;

namespace StudentVideo.Client.Components;

public partial class CuLoading: ComponentBase {
   [Inject] public required PageLoadingService _pageLoading { get; set; }

   [Parameter] public string? Class { get; set; } = string.Empty;

   private bool Loading = false;

   private void PageLoadingMethod(bool value) {
      Loading = value;
      StateHasChanged();
   }

   protected override void OnInitialized() {
      base.OnInitialized();

      _pageLoading.OnChange += PageLoadingMethod;
   }


}
